<html>

<meta http-equiv="Content-Type" content="application/msword"> 

<!--显示中文-->
<meta charset="UTF-8" />
<script type="text/javascript" src="../jquery-1.7.2.js"></script>

<script type="text/javascript">
    $(document).ready(function(){
        $("#dv").html("test");
        //alert("hello...");
        
        
        //测试按钮
        $("#testButton").click(function(){
            $.get(
                'http://blog.anydesign.cn/post/php_danyinhao.html',
                //'aken.php',
                //'http://localhost/http/httptest.php',
                {'name':'zj.aken'},
                function(data){
                    //alert("hello...");
                    $("#dv").html(data);
                }
            );
        });
        
        //测试按钮
        $("#testButton2").click(function(){
            $.ajax({                
                type:"get",
                url:"http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js",
                cache:"false",
                data:{name:'zj.aken'},
                success:function(data){
                    $("#dv").html(data);
                }
            });
        });
        
        //测试按钮
        $("#testButton3").click(function(){
            var url = "http://localhost/http/httptest.php";
            //$("#framediv").location = url;
            
            //alert(document.getElementsByName("framediv")[0].getAttribute("src"));
            //document.getElementsByName("framediv")[0].src = "http://localhost/file/test.doc";
            document.getElementsByName("framediv")[0].src = file_get_contents("http://localhost/file/test.doc");
            
            
            $.ajax({                
                type:"get",
                url:"http://localhost/file/showfile.php",
                success:function(data){
                    $("#dv").html(data);
                }
            });
            
            
        });
        
    });

</script>
<?php
//header("Content-Type:application/msword");
echo "Learning PHP ...<br>I am happy ...";
//打印html标签
echo '<br>';

//变量 赋值
$name = 'aken';

//打印变量
echo $name;
//打印变量
print_r($name);
//打印换行
echo '<br>';

//类型判断
if(is_string($name)){
    echo 'hehe...<br>';
    //双引号中直接使用变量
    echo "字符串长度为：strlen($name)";
    echo '<br>';
    print_r('zj'.'aken'.$name);
}
echo '<br>';


echo "http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js";

?>

<hr>
<p>html 页面</p>

<input id="testButton" type="button" value="获取文件" />
<br>
<input id="testButton2" type="button" value="获取文件2" />
<br>
<input id="testButton3" type="button" value="iframe" />


<div id="dv"></div>
<hr>

<iframe id="framediv" src = "" name="framediv" width="800" height="600"></iframe>




</html>